/*
 * @Author: your name
 * @Date: 2019-11-27 09:05:29
 * @LastEditTime: 2019-12-04 09:05:03
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \web\avue-cli\src\api\equipment\device\management.js
 */
import request from "@/router/axios";
import qs from "qs";

/**
 * @description: get设备设置列表
 * @param {object}
 * @return:promise
 */

// 维保执行 --- 条件分页查询(待维保、已维保)
export const getExecutionList = (data = {}) => request({
  url: `/maintenance/v1/pageQuery?page=${data.page}&size=${data.size}`,
  method: 'post',
  data: data.maintenance
})

// 维保申请单 --- 根据主键删除
export const getDeleteById = (data = {}) => request({
  url: '/maintenanceApplication/v1/getById',
  method: 'post',
  data: qs.stringify(data)
})

// 维保申请单 --- 根据主键查询
export const getMaintenanceById = (data = {}) => request({
  url: '/maintenance/v1/findById',
  method: 'post',
  data: qs.stringify(data)
})

// 添加维保单
export const addExecutionList = (data = {}) => request({
  url: '/maintenance/v1/update',
  method: 'post',
  data: data
})
